<template>
	<view class="main">
		<view class="navi-bar">
			<view class="navi-back" @click="goBack">
				<
			</view>
			<view class="navi-title">
				{{FeedBackList.faq.title.content}}
			</view>
			<view class="navi-history">
				{{FeedBackList.history.title.content}}
			</view>
		</view>
		<view class="feed-to" @click="naviTo">
			<view class="to-left">
				<image src="../../static/icons/fk.png" mode="heightFix"></image>
				<view class="left-text">
					{{FeedBackList.faq.feedbackButton.content}}
				</view>
			</view>
			<view class="to-right">
				>
			</view>
		</view>
		<view class="feed-normal">
			<view class="normal-title">
				{{FeedBackList.faq.faqTitle.content}}
			</view>
			<view class="normal-list">
				<view class="normal-item" @click="naviToFaq(n.id)" v-for="(n, i) in FeedBackList.faq.questions.content" :key="n.id">
					<view class="item-left">
						{{n.title}}
					</view>
					<view class="item-right">
						>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		http
	} from '../../untils/http.js'
	
	const url = 'feedback'
	
	export default {
		data() {
			return {
				FeedBackList: []
			}
		},
		created() {
			http(url).then(res => {
				this.FeedBackList = res.data
				console.log(this.FeedBackList);
			})
		},
		methods: {
			naviToFaq(id) {
				uni.navigateTo({
					url: '../FaqContent/FaqContent?id=' + id
				})
			},
			naviTo() {
				uni.navigateTo({
					url: '/pages/FeedBackDetails/FeedBackDetails'
				})
			},
			goBack() {
				// 返回上一级并刷新当前页面
				this.$router.go(-1)
			}
		}
	}
</script>

<style lang="scss">
	* {
		box-sizing: border-box;
	}
	
	.main {
		background-color: #f1f1f1;
		height: 1300rpx;
	}
	
	.navi-bar {
		padding: 0 10px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 80rpx;
		line-height: 80rpx;
		background-color: #fff;
		border-bottom: 1px solid #c1c1c1;
		
		.navi-back {
			color: #cc2225;
		}
		
		.navi-title {
			margin-left: 20px;
			font-size: 16px;
		}
		
		.navi-history {
			font-size: 12px;
			color: #cc2225;
		}
	}
	
	.feed-to {
		margin: 10px 0;
		padding: 10px;
		display: flex;
		justify-content: space-between;
		background-color: #fff;
		
		.to-left {
			display: flex;
			width: 200rpx;
			
			image {
				margin-right: 5px;
				// width: 100%;
				height: 100%;
			}
			
			.left-text {
				font-size: 14px;
			}
		}
	}
	
	.feed-normal {
		width: 750rpx;
	}
	
	.normal-title {
		padding: 0 10px 10px 10px;
		font-size: 14px;
	}
	
	.normal-list {
		width: 750rpx;
		
		.normal-item {
			padding: 10px;
			display: flex;
			justify-content: space-between;
			width: 100%;
			background-color: #fff;
			font-size: 14px;
			border-top: 1px solid #d9d9d9;
		}
	}
</style>
